package com.huanong.controller;
/*
 *@Author:anran
 *@Date:2020/12/9
 *@Version 1.0
 */

import com.huanong.common.grace.result.GraceJSONResult;
import com.huanong.pojo.Person;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletResponse;

@Api(value = "用户操作",tags = {"用户操作"})
@RequestMapping("/user")
@CrossOrigin(origins = "*")
public interface PersonControllerApi {

    @ApiOperation(value = "用户登录接口",notes = "用户登录",httpMethod = "POST")
    @PostMapping("/userLogin")
    GraceJSONResult userLogin(@RequestBody Person person, HttpServletResponse response);

    @ApiOperation(value = "用户注册接口",notes = "用户注册",httpMethod = "POST")
    @PostMapping("/userRegister")
    GraceJSONResult userRegister(@RequestBody Person person);

    @ApiOperation(value = "检测是否账号重复", notes = "检测是否账号重复", httpMethod = "GET")
    @GetMapping("/userAccountCheck")
    GraceJSONResult checkUser(@RequestParam String userAccount);
}


